<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数组的方法-includes</title>
</head>
<body>
  <script>
    /*
      includes: 
        检测数组中是否包含某个元素，如果有，返回true，否则返回false
        配合if语句使用
    */

    let strs = ['Y', 'Y', 'D', 'S']
    // console.log(strs.includes('D'))// true
    // console.log(strs.includes('M'))// false
  </script>
</body>
</html>
